package net.esj.basic.core.engine.config;

import net.esj.basic.utils.StringUtils;

public abstract class AbstractConfiguration implements Configuration {
	
	@Override
	public final String getProperty(String key) {
		String v= doGetProperty(key);
		return v;
	}

	@Override
	public final String getProperty(String key, String defaults) {
		String v = doGetProperty(key);
		if(!StringUtils.hasText(v)){
			return defaults;
		}else{
			return v;
		}
	}
	
	protected abstract String doGetProperty(String key);
	
}
